// 封装请求
import axios from 'axios'
// 请求
const http = axios.create({
  baseURL: 'http://122.224.205.42:6001/api/v1/energy',
  timeout: 6000
})

// 封装请求参数
function request({ method = 'get', url, data = {}, params = {}}) {
  return http({
    method,
    url,
    data,
    params,
  })
}
 
// 返出
export default request